<!--添加用户表单-->
<div class="tab_edit">
    <form action="{:Url('insurance_audit_submit')}" method="post" id="insurance_audit_submit">
        <input type="hidden" name="insurance_product_id" value="{$insurance_product_id}"/>
        <table width="100%" class="list">
            <tr>
                <td class="t_r t_left_w">所属机构类型：</td>
                <td class="t_l">{:widget('common/Select/select',array('insurance_agency_type','insurance_agency_type',$insurance_info['insurance_agency_type'],true,true))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">所属机构名称：</td>
                <td class="t_l">{:widget('common/Select/select_parent',array('insurance_agency_id',array($insurance_agency_list,"insurance_agency_id","insurance_agency_name","insurance_agency_type"),'insurance_agency_type',$insurance_info['insurance_agency_id'],true,true))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">保险产品名称：</td>
                <td class="t_l">{:widget("common/Input/input",array("insurance_product_name",$insurance_info['insurance_product_name'],true,true,"width:85%;"))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">名称拼音缩写：</td>
                <td class="t_l">{:widget("common/Input/input",array("insurance_product_name_py",$insurance_info['insurance_product_name_py'],true,true))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">有效区域：</td>
                <td class="t_l">
                    <div class="lists-tab-cont" style="width: 810px;border: 1px solid #ddd;">
                        <table width="100%" cellpadding="0" cellspacing="0" border="0">
                            <thead>
                                <tr>
                                    <th width="70%" class="tabSort-header">有效区域省份/城市<font color="red">（默认：不填表示全国有效！)</font></th>
                                </tr>
                            </thead>
                            <tbody>
                                {foreach name="product_area_list" item="info"}
                                    <tr class="info">
                                        <td>{:widget('common/Name/area',array($info['province']))}、{:widget('common/Name/area',array($info['city']))}</td>
                                    </tr>
                                {/foreach}
                            </tbody>
                        </table>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="t_r t_left_w">排序：</td>
                <td class="t_l">{:widget("common/Input/input",array("order_by",$insurance_info['order_by'],false,true))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">备注：</td>
                <td class="t_l">{:widget('common/TextArea/text_area',array('remark',$insurance_info['remark'],false,true,"width:85%"))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w">审核状态：</td>
                <td class="t_l">{:widget('common/Radio/radio',array('insurance_status','insurance_status_temp',null,true))}</td>
            </tr>
            <tr>
                <td class="t_r t_left_w"></td>
                <td class="t_l">
                    <div class="btn"><input type="submit" class="but_blue" value="保存信息"></div>
                </td>
            </tr>
        </table>
    </form>
</div>

<!-- JS处理 -->
<script language="javascript">
    $(function(){
        //提示信息
        $("#insurance_audit_submit").submit(function(){
            //判断是否选择是否
            if($("input[name='insurance_status']:checked").val() == 3){

                //判断是否填写失败理由
                if($.trim($("textarea[name='audit_note']").val()) == ""){
                    alert("请填写审核失败说明！");
                    return false;
                }
            }

            //审核通过
            return true;
        });
    });
</script>